home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIDragSession.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  9KB  |  246 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIDragSession.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIDragSession_h__
  6. #define __gen_nsIDragSession_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISupportsArray_h__
  14. #include "nsISupportsArray.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsITransferable_h__
  18. #include "nsITransferable.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25. #include "nsSize.h"
  26. class nsIDOMDocument; /* forward declaration */
  27.  
  28. class nsIDOMNode; /* forward declaration */
  29.  
  30.  
  31. /* starting interface:    nsIDragSession */
  32. #define NS_IDRAGSESSION_IID_STR "cba22c53-fcce-11d2-96d4-0060b0fb9956"
  33.  
  34. #define NS_IDRAGSESSION_IID \
  35.   {0xcba22c53, 0xfcce, 0x11d2, \
  36.     { 0x96, 0xd4, 0x00, 0x60, 0xb0, 0xfb, 0x99, 0x56 }}
  37.  
  38. class NS_NO_VTABLE nsIDragSession : public nsISupports {
  39.  public: 
  40.  
  41.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAGSESSION_IID)
  42.  
  43.   /**
  44.     * Set the current state of the drag whether it can be dropped or not.
  45.     * usually the target "frame" sets this so the native system can render the correct feedback
  46.     */
  47.   /* attribute boolean canDrop; */
  48.   NS_IMETHOD GetCanDrop(PRBool *aCanDrop) = 0;
  49.   NS_IMETHOD SetCanDrop(PRBool aCanDrop) = 0;
  50.  
  51.   /**
  52.     * Sets the action (copy, move, link, et.c) for the current drag 
  53.     */
  54.   /* attribute unsigned long dragAction; */
  55.   NS_IMETHOD GetDragAction(PRUint32 *aDragAction) = 0;
  56.   NS_IMETHOD SetDragAction(PRUint32 aDragAction) = 0;
  57.  
  58.   /**
  59.     * Sets the current width and height if the drag target area. 
  60.     * It will contain the current size of the Frame that the drag is currently in
  61.     */
  62.   /* [noscript] attribute nsSize targetSize; */
  63.   NS_IMETHOD GetTargetSize(nsSize *aTargetSize) = 0;
  64.   NS_IMETHOD SetTargetSize(nsSize aTargetSize) = 0;
  65.  
  66.   /**
  67.     * Get the number items that were dropped
  68.     */
  69.   /* readonly attribute unsigned long numDropItems; */
  70.   NS_IMETHOD GetNumDropItems(PRUint32 *aNumDropItems) = 0;
  71.  
  72.   /**
  73.     * The document where the drag was started, which will be null if the
  74.     * drag originated outside the application. Useful for determining if a drop
  75.     * originated in the same document.
  76.     */
  77.   /* readonly attribute nsIDOMDocument sourceDocument; */
  78.   NS_IMETHOD GetSourceDocument(nsIDOMDocument * *aSourceDocument) = 0;
  79.  
  80.   /**
  81.     * The dom node that was originally dragged to start the session, which will be null if the
  82.     * drag originated outside the application.
  83.     */
  84.   /* readonly attribute nsIDOMNode sourceNode; */
  85.   NS_IMETHOD GetSourceNode(nsIDOMNode * *aSourceNode) = 0;
  86.  
  87.   /**
  88.     * Get data from a Drag&Drop. Can be called while the drag is in process
  89.     * or after the drop has completed.  
  90.     *
  91.     * @param  aTransferable the transferable for the data to be put into
  92.     * @param  aItemIndex which of multiple drag items, zero-based
  93.     */
  94.   /* void getData (in nsITransferable aTransferable, in unsigned long aItemIndex); */
  95.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRUint32 aItemIndex) = 0;
  96.  
  97.   /**
  98.     * Check to set if ant of the native data on the clipboard matches this data flavor
  99.     *
  100.     * @result NS_OK if if the data flavor is supported and, NS_ERROR_FAILURE is it is not
  101.     */
  102.   /* boolean isDataFlavorSupported (in string aDataFlavor); */
  103.   NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, PRBool *_retval) = 0;
  104.  
  105. };
  106.  
  107. /* Use this macro when declaring classes that implement this interface. */
  108. #define NS_DECL_NSIDRAGSESSION \
  109.   NS_IMETHOD GetCanDrop(PRBool *aCanDrop); \
  110.   NS_IMETHOD SetCanDrop(PRBool aCanDrop); \
  111.   NS_IMETHOD GetDragAction(PRUint32 *aDragAction); \
  112.   NS_IMETHOD SetDragAction(PRUint32 aDragAction); \
  113.   NS_IMETHOD GetTargetSize(nsSize *aTargetSize); \
  114.   NS_IMETHOD SetTargetSize(nsSize aTargetSize); \
  115.   NS_IMETHOD GetNumDropItems(PRUint32 *aNumDropItems); \
  116.   NS_IMETHOD GetSourceDocument(nsIDOMDocument * *aSourceDocument); \
  117.   NS_IMETHOD GetSourceNode(nsIDOMNode * *aSourceNode); \
  118.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRUint32 aItemIndex); \
  119.   NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, PRBool *_retval); 
  120.  
  121. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  122. #define NS_FORWARD_NSIDRAGSESSION(_to) \
  123.   NS_IMETHOD GetCanDrop(PRBool *aCanDrop) { return _to GetCanDrop(aCanDrop); } \
  124.   NS_IMETHOD SetCanDrop(PRBool aCanDrop) { return _to SetCanDrop(aCanDrop); } \
  125.   NS_IMETHOD GetDragAction(PRUint32 *aDragAction) { return _to GetDragAction(aDragAction); } \
  126.   NS_IMETHOD SetDragAction(PRUint32 aDragAction) { return _to SetDragAction(aDragAction); } \
  127.   NS_IMETHOD GetTargetSize(nsSize *aTargetSize) { return _to GetTargetSize(aTargetSize); } \
  128.   NS_IMETHOD SetTargetSize(nsSize aTargetSize) { return _to SetTargetSize(aTargetSize); } \
  129.   NS_IMETHOD GetNumDropItems(PRUint32 *aNumDropItems) { return _to GetNumDropItems(aNumDropItems); } \
  130.   NS_IMETHOD GetSourceDocument(nsIDOMDocument * *aSourceDocument) { return _to GetSourceDocument(aSourceDocument); } \
  131.   NS_IMETHOD GetSourceNode(nsIDOMNode * *aSourceNode) { return _to GetSourceNode(aSourceNode); } \
  132.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRUint32 aItemIndex) { return _to GetData(aTransferable, aItemIndex); } \
  133.   NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, PRBool *_retval) { return _to IsDataFlavorSupported(aDataFlavor, _retval); } 
  134.  
  135. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  136. #define NS_FORWARD_SAFE_NSIDRAGSESSION(_to) \
  137.   NS_IMETHOD GetCanDrop(PRBool *aCanDrop) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanDrop(aCanDrop); } \
  138.   NS_IMETHOD SetCanDrop(PRBool aCanDrop) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCanDrop(aCanDrop); } \
  139.   NS_IMETHOD GetDragAction(PRUint32 *aDragAction) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDragAction(aDragAction); } \
  140.   NS_IMETHOD SetDragAction(PRUint32 aDragAction) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDragAction(aDragAction); } \
  141.   NS_IMETHOD GetTargetSize(nsSize *aTargetSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTargetSize(aTargetSize); } \
  142.   NS_IMETHOD SetTargetSize(nsSize aTargetSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTargetSize(aTargetSize); } \
  143.   NS_IMETHOD GetNumDropItems(PRUint32 *aNumDropItems) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumDropItems(aNumDropItems); } \
  144.   NS_IMETHOD GetSourceDocument(nsIDOMDocument * *aSourceDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSourceDocument(aSourceDocument); } \
  145.   NS_IMETHOD GetSourceNode(nsIDOMNode * *aSourceNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSourceNode(aSourceNode); } \
  146.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRUint32 aItemIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aTransferable, aItemIndex); } \
  147.   NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsDataFlavorSupported(aDataFlavor, _retval); } 
  148.  
  149. #if 0
  150. /* Use the code below as a template for the implementation class for this interface. */
  151.  
  152. /* Header file */
  153. class nsDragSession : public nsIDragSession
  154. {
  155. public:
  156.   NS_DECL_ISUPPORTS
  157.   NS_DECL_NSIDRAGSESSION
  158.  
  159.   nsDragSession();
  160.  
  161. private:
  162.   ~nsDragSession();
  163.  
  164. protected:
  165.   /* additional members */
  166. };
  167.  
  168. /* Implementation file */
  169. NS_IMPL_ISUPPORTS1(nsDragSession, nsIDragSession)
  170.  
  171. nsDragSession::nsDragSession()
  172. {
  173.   /* member initializers and constructor code */
  174. }
  175.  
  176. nsDragSession::~nsDragSession()
  177. {
  178.   /* destructor code */
  179. }
  180.  
  181. /* attribute boolean canDrop; */
  182. NS_IMETHODIMP nsDragSession::GetCanDrop(PRBool *aCanDrop)
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186. NS_IMETHODIMP nsDragSession::SetCanDrop(PRBool aCanDrop)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* attribute unsigned long dragAction; */
  192. NS_IMETHODIMP nsDragSession::GetDragAction(PRUint32 *aDragAction)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196. NS_IMETHODIMP nsDragSession::SetDragAction(PRUint32 aDragAction)
  197. {
  198.     return NS_ERROR_NOT_IMPLEMENTED;
  199. }
  200.  
  201. /* [noscript] attribute nsSize targetSize; */
  202. NS_IMETHODIMP nsDragSession::GetTargetSize(nsSize *aTargetSize)
  203. {
  204.     return NS_ERROR_NOT_IMPLEMENTED;
  205. }
  206. NS_IMETHODIMP nsDragSession::SetTargetSize(nsSize aTargetSize)
  207. {
  208.     return NS_ERROR_NOT_IMPLEMENTED;
  209. }
  210.  
  211. /* readonly attribute unsigned long numDropItems; */
  212. NS_IMETHODIMP nsDragSession::GetNumDropItems(PRUint32 *aNumDropItems)
  213. {
  214.     return NS_ERROR_NOT_IMPLEMENTED;
  215. }
  216.  
  217. /* readonly attribute nsIDOMDocument sourceDocument; */
  218. NS_IMETHODIMP nsDragSession::GetSourceDocument(nsIDOMDocument * *aSourceDocument)
  219. {
  220.     return NS_ERROR_NOT_IMPLEMENTED;
  221. }
  222.  
  223. /* readonly attribute nsIDOMNode sourceNode; */
  224. NS_IMETHODIMP nsDragSession::GetSourceNode(nsIDOMNode * *aSourceNode)
  225. {
  226.     return NS_ERROR_NOT_IMPLEMENTED;
  227. }
  228.  
  229. /* void getData (in nsITransferable aTransferable, in unsigned long aItemIndex); */
  230. NS_IMETHODIMP nsDragSession::GetData(nsITransferable *aTransferable, PRUint32 aItemIndex)
  231. {
  232.     return NS_ERROR_NOT_IMPLEMENTED;
  233. }
  234.  
  235. /* boolean isDataFlavorSupported (in string aDataFlavor); */
  236. NS_IMETHODIMP nsDragSession::IsDataFlavorSupported(const char *aDataFlavor, PRBool *_retval)
  237. {
  238.     return NS_ERROR_NOT_IMPLEMENTED;
  239. }
  240.  
  241. /* End of implementation class template. */
  242. #endif
  243.  
  244.  
  245. #endif /* __gen_nsIDragSession_h__ */
  246.